<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopAccounts extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_accounts', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('shopid')->comment('商家ID');
            $table->dateTime('accounttime')->comment('结款时间');
            $table->string('orderid', 1000)->comment('相关订单ID');
            $table->decimal('accountamount', 16,2)->comment('结款金额');
            $table->integer('adminid')->comment('操作人ID');
            $table->string('allinpaynumber')->comment('通联订单号');
            $table->integer('status')->default(0)->comment('状态0未打款1已打款2打款失败3正在打款');
            $table->string('content', 500)->nullable()->comment('通联回执内容');
            $table->string('contentjson',5000)->nullable()->comment('通联回执信息');
            $table->string('bankcard', 50)->default('')->comment('打款银行卡号');
            $table->string('cardholder', 20)->default('')->comment('持卡人');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
